/*=============================================================================
*
*   Copyright (C) 2020 All rights reserved.
*
*   Filename:		append.hpp
*
*   Author: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Date: 2020-03-21 16:08
*
*   Last Editors: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Last modified:	2020-03-24 15:06
*
*   Description:
*
=============================================================================*/
#ifndef APPEND_H
#define APPEND_H

namespace geoxfem {
namespace util {

template <typename Container>
struct append_impl {
  template <typename Item, typename return_type>
  static return_type apply(Container&, Item&) {
    throw "not implented yet";
  }
};

template <typename Container, typename Item, typename return_type = Item*>
return_type append(Container& container, Item& item) {
  return append_impl<Container>::template apply<return_type>(container, item);
}
}  // namespace util
}  // namespace geoxfem

#endif /* APPEND_H */
